<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('三才配置列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>三才：</p>
                                <input type="text" name="sancai"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="naming:sancaianalysis:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('naming:sancaianalysis:edit')}]];
        var removeFlag = [[${@permission.hasPermi('naming:sancaianalysis:remove')}]];
        var prefix = ctx + "naming/sancaianalysis";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "三才配置",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'id', 
                    title : 'id',
                    visible: false
                },
                {
                    field : 'sancai', 
                    title : '三才'
                },
                {
                    field : 'jixiong', 
                    title : '吉凶'
                },
                {
                    field : 'analysis', 
                    title : '分析',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'zonglun', 
                    title : '总论',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'xingge', 
                    title : '性格',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'yizhi', 
                    title : '意志',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'shiye', 
                    title : '事业',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'jiating', 
                    title : '家庭',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'hunyin', 
                    title : '婚姻',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'zinv', 
                    title : '子女',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'shejiao', 
                    title : '社交',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'jingshen', 
                    title : '精神',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'caiyun', 
                    title : '财运',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'jiankang', 
                    title : '健康',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    field : 'laoyun', 
                    title : '老运',
                    formatter: function(value, row, index) {
                		return $.table.tooltip(value);
                	}
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>